<template>
  <div>
    <div v-for="(item,index) in menus" :key="index">
      <Submenu v-if="item.treeLeaf == '0'" :name="item.menuHref">
        <template slot="title">
          <Icon v-if="item.menuIcon" :type="item.menuIcon" />
          {{item.menuName}}
        </template>
        <menuSub v-if="item.children != null" :menus="item.children"></menuSub>
      </Submenu>
      <MenuItem v-else :name="item.menuHref">
        <Icon v-if="item.menuIcon" :type="item.menuIcon" />
        {{item.menuName}}
      </MenuItem>
    </div>
  </div>
</template>
<!--递归菜单组件-->
<script>
  import menuSub from "./menu_sub"

  export default {
    name: "menuSub",
    props:{
      menus : null
    },
    components: {
      menuSub
    },
    methods : {
    }
  }
</script>
